<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">全流程甲方独立流程</ui:define>
    <ui:define name="content">
        <h:form>
            <p:defaultCommand target="search"/>
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="left">
                        <p:commandButton id="toggler" type="button" value="展示选择"
                                         style="width: auto;"
                                         icon="ui-icon-calculator"
                                         />
                        <p:columnToggler datasource="WholeProcessDataTable" trigger="toggler"
                                         />
                    </f:facet>
                    <f:facet name="right">
                        <p:commandButton id="search" value="查询" icon="fa fa-search"
                                         update="@form"
                                         />
                        <p:commandButton value="导出" icon="fa fa-download"
                                         ajax="false">
                            <p:dataExporter type="xls" target="WholeProcessDataTable" fileName="export"/>
                        </p:commandButton>
                    </f:facet>
                </p:toolbar>
            </div>
            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="ui-g">
                    <div class="ui-g-12">
                        <div class="card">
                            <h1>查询条件</h1>
                            <p:panelGrid columns="10" layout="grid"
                                         columnClasses="ui-grid-col-1,ui-grid-col-1"
                                         styleClass="ui-panelgrid-blank"
                                         style="border:0px none; background-color:transparent;">

                                <p:outputLabel for="startedate" value="开始日期"/>
                                <p:calendar id="startedate" value="#{wholeProcessIndependentListBean.$.startDate}"
                                            locale="#{constants:get('LOCALE')}"
                                            timeZone="#{constants:get('TIME_ZONE')}"
                                            pattern="#{constants:get('DATE_FORMAT')}"/>
                                <p:outputLabel for="enddate" value="结束日期"/>
                                <p:calendar id="enddate" value="#{wholeProcessIndependentListBean.$.endDate}"
                                            locale="#{constants:get('LOCALE')}"
                                            timeZone="#{constants:get('TIME_ZONE')}"
                                            pattern="#{constants:get('DATE_FORMAT')}"/>


                                <p:outputLabel for="activity_name" value="活动名称"/>
                                <p:inputText id="activity_name" value="#{wholeProcessIndependentListBean.$.activityName}"/>

                                <p:outputLabel for="product">产品：</p:outputLabel>
                                <p:selectOneMenu id="product" value="#{wholeProcessIndependentListBean.$.prdId}"
                                    filter="true">
                                    <f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>
                                    <f:selectItems
                                            value="#{wholeProcessIndependentListBean.getCommProductIds()}"
                                            var="prd"
                                            itemLabel="#{prd.name}(#{prd.productId})"
                                            itemValue="#{prd.productId}"/>
                                </p:selectOneMenu>

                            </p:panelGrid>
                        </div>
                        <div class="card">
                            <p:dataTable id="WholeProcessDataTable"
                                         style="width: 100%"
                                         var="record"
                                         value="#{wholeProcessIndependentListBean.lazyDataModel}"
                                         rows="#{constants:get('ROWS')}"
                                         lazy="true"
                                         paginator="true"
                                         paginatorTemplate="#{constants:get('PAGINATOR_TEMPLATE')}"
                                         rowsPerPageTemplate="#{constants:get('ROWS_PER_PAGE_TEMPLATE')}"
                                         emptyMessage="#{constants:get('EMPTY_MESSAGE')}"
                                         scrollable="true"
                                         scrollWidth="97%"
                                         reflow="true"
                                         selection="#{wholeProcessIndependentListBean.selectedRecords}"
                                         resizableColumns="true"
                                         >

                                <p:column headerText="日期">
                                    <h:outputText value="#{record.time}"/>
                                </p:column>
                                <p:column headerText="产品名称">
                                    <h:outputText value="#{wholeProcessIndependentListBean.translateProduct(record.prdId)}"/>
                                </p:column>
                                <p:column headerText="活动名称">
                                    <h:outputText value="#{record.activityName}"/>
                                </p:column>
                                <p:column headerText="认证资料聚合页uv">
                                    <h:outputText value="#{record.approveUv}"/>
                                </p:column>
                                <p:column headerText="推单UV">
                                    <h:outputText value="#{record.pushOrderUv}"/>
                                </p:column>
                                <p:column headerText="提交成功页UV">
                                    <h:outputText value="#{record.commitSuccessUv}"/>
                                </p:column>
                                <p:column headerText="签约页UV">
                                    <h:outputText value="#{record.signUv}"/>
                                </p:column>
                                <p:column headerText="签约完成UV">
                                    <h:outputText value="#{record.signCompleteUv}"/>
                                </p:column>
                                <p:column headerText="等待放款页UV">
                                    <h:outputText value="#{record.waitMoney}"/>
                                </p:column>
                                <p:column headerText="首次进入账单页UV">
                                    <h:outputText value="#{record.firstInnerOrder}"/>
                                </p:column>
                                <p:column headerText="实名认证UV">
                                    <h:outputText value="#{record.realName}"/>
                                </p:column>
                                <p:column headerText="拍摄正面UV">
                                    <h:outputText value="#{record.faceuv}"/>
                                </p:column>
                                <p:column headerText="拍摄反面UV">
                                    <h:outputText value="#{record.backuv}"/>
                                </p:column>
                                <p:column headerText="实名认证下一步">
                                    <h:outputText value="#{record.realNameNext}"/>
                                </p:column>
                                <p:column headerText="OCR比对完成">
                                    <h:outputText value="#{record.ocrComplete}"/>
                                </p:column>
                                <p:column headerText="活体检测UV">
                                    <h:outputText value="#{record.bioAsSay}"/>
                                </p:column>
                                <p:column headerText="活体比对通过">
                                    <h:outputText value="#{record.bioAssayComplete}"/>
                                </p:column>
                                <p:column headerText="完成实名认证/活体认证">
                                    <h:outputText value="#{record.realNameComplete}"/>
                                </p:column>
                                <p:column headerText="发起运营商认证UV">
                                    <h:outputText value="#{record.operaCerTy}"/>
                                </p:column>
                                <p:column headerText="完成运营商认证UV">
                                    <h:outputText value="#{record.operaCerTyComplete}"/>
                                </p:column>
                                <p:column headerText="完善信息页UV">
                                    <h:outputText value="#{record.completeInfo}"/>
                                </p:column>

                                <p:column headerText="完善信息页完成">
                                    <h:outputText value="#{record.completeInfoComplete}"/>
                                </p:column>
                                <p:column headerText="绑卡页UV">
                                    <h:outputText value="#{record.bindCard}"/>
                                </p:column>
                                <p:column headerText="绑卡页完成">
                                    <h:outputText value="#{record.bindCardComplete}"/>
                                </p:column>
                            </p:dataTable>
                        </div>
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>
